package com.cpp.web.servlet;


import java.util.Timer;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import com.cpp.task.GetWeibo_TimerTask;

public class TimerServlet extends HttpServlet {

	/**
	 * Constructor of the object.
	 */
	public TimerServlet() {
		super();
	}

	/**
	 * Destruction of the servlet. <br>
	 */
	public void destroy() {
		super.destroy(); // Just puts "destroy" string in log
		timer.cancel();
	}

	/**
	 * Initialization of the servlet. <br>
	 *
	 * @throws ServletException if an error occurs
	 */
	public void init() throws ServletException {
		
		//timer.schedule(new GetWeibo_TimerTask(), 0,1000*60*5);//一分钟执行一次
	}
	Timer timer = new Timer();
	

}
